import Mock from './mock.angular';

Mock.mock('/web/api/codeDict/getPostType', 'get', {
  success: true,
  message: '',
  code: 200,
  total() {
    return this.rows.length;
  },
  'rows|4': [
    {
      id: '@id',
      name: '@word',
      code: '@word',
    },
  ],
});

Mock.mock('/api/v1/codeDict/postion/query', 'post', {
  success: true,
  message: '',
  code: 200,
  total() {
    return this.rows.length;
  },
  'rows|4': [
    {
      id: '@id',
      name: '@word',
      code: '@word',
      typeCodeName: '@word',
      typeCode: '@word',
      codeObject: 2,
    },
  ],
});

Mock.mock('/api/v1/codeDict/dept/query', 'post', {
  success: true,
  message: '',
  code: 200,
  'rows|4': [
    {
      id: '@id',
      name: '@word',
      code: '@word',
      typeCodeName: '@word',
      typeCode: '@word',
      'codeObject|1': [2, 3, 4, 5],
    },
  ],
});

Mock.mock('/api/v1/codeDict/deviceCategory/query', 'post', {
  success: true,
  message: '',
  code: 200,
  'rows|4': [
    {
      id: '@id',
      name: '@word',
      code: '@word',
      typeCodeName: '@word',
      typeCode: '@word',
      'codeObject|1': [2, 3, 4, 5],
    },
  ],
});

Mock.mock('/api/v1/codeDict/deviceUsedLocation/query', 'post', {
  success: true,
  message: '',
  code: 200,
  'rows|4': [
    {
      id: '@id',
      name: '@word',
      code: '@word',
      typeCodeName: '@word',
      typeCode: '@word',
      'codeObject|1': [2, 3, 4, 5],
    },
  ],
});

Mock.mock('/api/v1/codeDict/postion/add', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/codeDict/postion/update', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/codeDict/postion/delete', 'post', {
  success: true,
  message: '',
  code: 200,
});
